package com.example.yinhangmiaosha.service;

import com.example.yinhangmiaosha.domain.User;

public interface UserService {

    /**
     * 获取用户验证Hash
     * @param sid
     * @param userId
     * @return
     * @throws Exception
     */
    public String getVerifyHash(Integer sid, Integer userId) throws Exception;

    /**
     * 添加用户访问次数
     * @param userId
     * @return
     * @throws Exception
     */
    public int addUserCount(Integer userId) throws Exception;

    /**
     * 检查用户是否被禁
     * @param userId
     * @return
     */
    public boolean getUserIsBanned(Integer userId);

    /**
     * 据用户名查询用户
     * @param userName
     * @return
     */
    public User getUserByName(String userName);

    /**
     * 检查用户是否符合初筛条件
     * @param userId
     * @return
     */
    public boolean getUserIsPermitted(Integer userId);

    public Boolean getUserIsPermittedByCache(Integer userId);

    public boolean getUserIsPermittedByCheck(Integer userId);

    public boolean getAgeIsPermitted(User user);

    public boolean getCreditIsPermitted(User user);

    public boolean getJobIsPermitted(User user);

    public boolean getRecordIsPermitted(User user);
}
